package com.dede.getmusic

import android.app.Application
import com.lzy.okgo.OkGo
import com.lzy.okgo.cache.CacheMode
import com.squareup.leakcanary.LeakCanary

/**
 * @author hsh
 * @date 2017/9/29 15:23.
 * @doc
 */
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            // You should not init your app in this process.
            return
        }
        LeakCanary.install(this)
        OkGo.getInstance()
                .setCacheMode(CacheMode.FIRST_CACHE_THEN_REQUEST)
                .setCacheTime(1000 * 60 * 10)
                .init(this)
    }
}